package com.acme.logging;

import java.util.List;

class ConsoleLogWriter extends LogWriter {
    @Override
    synchronized void writeLog(String log) {
        if (log == null) return;
        if (log.contains(MyLogger.Level.DEBUG.toString()) || log.contains(MyLogger.Level.INFO.toString())) {
            System.out.println(log);
        } else if (log.contains(MyLogger.Level.ERROR.toString())) {
            System.err.println(log);
        }
    }

    @Override
    void close() {

    }
}
